Skip to content

Conversation

TJLTM
Copy link

@TJLTM TJLTM commented Jun 24, 2022

  • Adding Pressure Normalization function to Sea Level equiv to output

* Adding Pressure Normalization function to Sea Level equiv to output
@jesawyers
Copy link

jesawyers commented Jun 25, 2022

Here are two functions that I use to take a pressure reading (at altitude) and normalize to sea level pressure. I have tested these functions and they work great.

//********************************************************************************
double calcSeaLevelPress_hPa(double inP_hPa, double inAlt_mtrs) 
{
   double calc = 0.0;

   calc = pow((1 - (inAlt_mtrs / 44330)), 5.255);
   
   return(inP_hPa / calc);
} 
//********************************************************************************
double calcCorrectedPress_hPa(double inP_hPa, double inP_SL, double inAlt_mtrs, double inDegC) 
{
   double calc = 0.0;

   calc = (0.0065 * inAlt_mtrs) / (inDegC + (0.0065 * inAlt_mtrs) + 273.15);
   calc = 1 - calc;
   return(inP_hPa * pow(calc,-5.257));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants